package org.jupiter.blog.service.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jupiter.blog.api.domain.JupiterUserRole;

import java.util.List;

@Mapper
public interface JupiterUserRoleMapper {

	int insert(JupiterUserRole userRole);

	JupiterUserRole selectByUuid(@Param("uuid") String uuid);

	List<JupiterUserRole> selectAll();

	List<JupiterUserRole> selectByUserUuid(@Param("userUuid") String userUuid);

	List<JupiterUserRole> selectByRoleId(@Param("roleUuid") String roleUuid);

	int updateByUuidSelective(JupiterUserRole userRole);

	int deleteByUuid(@Param("uuid") String uuid);

	int deleteByUserUuid(@Param("userUuid") String userUuid);

	int deleteByRoleUuid(@Param("roleUuid") String roleUuid);

	int insertBatch(@Param("list") List<JupiterUserRole> userRoles);
}
